# @Time : 2024/12/20 22:28
# @Author : Fioman 
# @Phone : 13149920693
"""
userinfos表的访问操作模块
"""
import time

from common.datetime_helper import get_now_str
from db_tool.db_config import TableName, TableRegister
from personal_tool.enum_data import Role

tableName: str = TableName.userinfos.name
initData = {

    "key": int(time.time()),
    "username": "user",
    "password": "hd",
    "role": Role.User.value,
    "registerTime": get_now_str(),
    "lastLoginTime": "未登录",
}
TableRegister.register_table(tableName, initData)

if __name__ == '__main__':
    from db_tool.db_config import re_init_table

    # 重新创建表结构,或者新增表字段之后,重新初始化表内容,谨慎使用
    re_init_table(tableName, initData)
